package io.renren.modules.medical.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.UpdateGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * 
 * 
 * @author luosheng
 * @email luoshengshuai@foxmail.com
 * @date 2023-04-04 10:00:52
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("medication_advice")
public class MedicationAdviceEntity extends QueryPageBaseEntity{
	private static final long serialVersionUID = 1L;

	/**
	 * 药品名称
	 */
	@NotBlank(message = "药品名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
	@TableField("drug_name")
	private String drugName;

	/**
	 * 每日次数
	 */
	@NotNull(message = "每日次数不能为空", groups = {AddGroup.class, UpdateGroup.class})
	@TableField("med_frequency")
	private Integer medFrequency;

	/**
	 * 药瓶使用说明
	 */
	@NotBlank(message = "用药说明不能为空", groups = {AddGroup.class, UpdateGroup.class})
	@TableField("med_comment")
	private String medComment;

	/**
	 * 药品使用时间
	 */
	@NotBlank(message = "药品使用时间不能为空", groups = {AddGroup.class, UpdateGroup.class})
	@TableField("med_time")
	private String medTime;

	/**
	 * 启用状态
	 */
	@Null(message = "新增或修改不需要status值", groups = {UpdateGroup.class, AddGroup.class})
	@TableField("status")
	private Integer status;
}
